//
//  U9GifLoadView.m
//  U9WatchGame
//
//  Created by uuu9 on 2017/5/15.
//  Copyright © 2017年 UUU9. All rights reserved.
//

#import "U9GifLoadView.h"

@implementation U9GifLoadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)init{
    if (self = [super init]) {
       NSString *filePath = [[NSBundle mainBundle] pathForResource:NSLocalizedString(@"webload", nil) ofType:@"gif"];
        NSData *gifData = [NSData dataWithContentsOfFile:filePath];
        //取消回弹效果
        self.scrollView.bounces=NO;
        self.backgroundColor = [UIColor clearColor];
        //设置缩放模式
        self.scalesPageToFit = YES;
        //用webView加载数据
        [self loadData:gifData MIMEType:@"image/gif" textEncodingName:@"" baseURL:[NSURL URLWithString:@""]];

    }
    return self;
}

@end
